export default {
    buttonList: [
        {
            name: "不计点数缺陷尺寸",
            index: 0,
            columns: [
                {
                    title: "母材公称厚度下限（mm）",
                    minWidth: 210,
                    tooltip:true,
                    key: "mat_min_thick",
                    render: (h, params) => {
                        return h('span', `> ${params.row.mat_min_thick}`)
                    }
                },
                {
                    title: "母材公称厚度上限（mm）",
                    minWidth: 210,
                    tooltip:true,
                    key: "mat_max_thick",
                    render: (h, params) => {
                        return h('span', `≤ ${params.row.mat_max_thick}`)
                    }
                },
                {
                    title: "缺陷长径类型",
                    minWidth: 120,
                    tooltip:true,
                    key: "diameter_type",
                    render: (h, params) => {
                        if (params.row.diameter_type == 1) {
                            return h('span', '数值')
                        }
                        if (params.row.diameter_type == 2) {
                            return h('span', '母材公称厚度(壁厚)')
                        }
                    }
                },
                {
                    title: "允许缺陷长径",
                    minWidth: 150,
                    tooltip:true,
                    key: "allow_diameter",
                    render: (h, params) => {
                        return h('span', `≤ ${params.row.allow_diameter}`)
                    }
                },
                {
                    title: "备注",
                    minWidth: 100,
                    tooltip:true,
                    key: "remark",
                },

            ],
            tableData: [],
            interfaceList: "setRuleNotFlawSizeList",
            interfaceAdd: "setRuleNotFlawSizeAdd",
            interfaceDel: "setRuleNotFlawSizeDel",
            interfaceEdit: "setRuleNotFlawSizeEdit",
        },
        {
            name: "缺陷点数换算表",
            index: 1,
            columns: [

                {
                    title: "缺陷长径下限（mm）",
                    minWidth: 210,
                    tooltip:true,
                    key: "min_diameter",
                    render: (h, params) => {
                        return h('span', `> ${params.row.min_diameter}`)
                    }
                },
                {
                    title: "缺陷长径上限（mm）",
                    minWidth: 210,
                    tooltip:true,
                    key: "max_diameter",
                    render: (h, params) => {
                        return h('span', `≤ ${params.row.max_diameter}`)
                    }
                },
                {
                    title: "缺陷点数",
                    minWidth: 120,
                    tooltip:true,
                    key: "flaw_count",
                },

                {
                    title: "备注",
                    minWidth: 100,
                    tooltip:true,
                    key: "remark",
                },

            ],
            tableData: [],
            interfaceList: "setCountConversionList",
            interfaceAdd: "setCountConversionAdd",
            interfaceDel: "setCountConversionDel",
            interfaceEdit: "setCountConversionEdit",
        },
        {
            name: "允许缺陷点数",
            index: 2,
            columns: [
                {
                    title: "缺陷等级",
                    minWidth: 100,
                    tooltip:true,
                    key: "flaw_level",
                    render: (h, params) => {
                        if (params.row.flaw_level == 1) {
                            return h('span', {class:'text-overflow'}, 'Ⅰ级')
                        }
                        if (params.row.flaw_level == 2) {
                            return h('span', {class:'text-overflow'}, 'Ⅱ级')
                        }
                        if (params.row.flaw_level == 3) {
                            return h('span', {class:'text-overflow'}, 'Ⅲ级')
                        }
                        if (params.row.flaw_level == 4) {
                            return h('span', {class:'text-overflow'}, 'Ⅳ级')
                        }
                    }
                },
                {
                    title: "评定区",
                    minWidth:80,
                    tooltip:true,
                    render: (h, params) => {
                        return h('span', { class:'text-overflow'}, `${params.row.area_width} * ${params.row.area_lenght}`)
                    }
                },
                {
                    title: "母材公称厚度下限（mm）",
                    width: 220,
                    tooltip:true,
                    key: "mat_min_thick",
                    render: (h, params) => {
                        return h('span',{class:'text-overflow'}, `> ${params.row.mat_min_thick}`)
                    }
                },
                {
                    title: "母材公称厚度上限（mm）",
                    width: 220,
                    key: "mat_max_thick",
                    tooltip:true,
                    render: (h, params) => {
                        return h('span',{class:'text-overflow'}, `≤ ${params.row.mat_max_thick}`)
                    }
                },
                {
                    title: "允许缺陷点数",
                    minWidth: 120,
                    tooltip:true,
                    key: "allow_count",
                    render: (h, params) => {
                        return h('span',{class:'text-overflow'}, `≤ ${params.row.allow_count}`)
                    }

                },
                {
                    title: "备注",
                    minWidth: 80,
                    tooltip:true,
                    key: "remark",
                },

            ],
            tableData: [],
            interfaceList: "setallowCountList",
            interfaceAdd: "setallowCountAdd",
            interfaceDel: "setallowCountDel",
            interfaceEdit: "setallowCountEdit",
        },
        {
            name: "微小缺陷降级",
            index: 3,
            columns: [

                {
                    title: "原等级",
                    minWidth: 80,
                    tooltip:true,
                    tooltip:true,
                    render: (h, params) => {
                        if (params.row.flaw_level == 1) {
                            return h('span', {class:'text-overflow'}, 'Ⅰ级')
                        }
                        if (params.row.flaw_level == 2) {
                            return h('span', {class:'text-overflow'}, 'Ⅱ级')
                        }
                        if (params.row.flaw_level == 3) {
                            return h('span', {class:'text-overflow'}, 'Ⅲ级')
                        }
                        if (params.row.flaw_level == 4) {
                            return h('span', {class:'text-overflow'}, 'Ⅳ级')
                        }
                    }
                },
                {
                    title: "母材公称厚度下限（mm）",
                    minWidth: 210,
                    tooltip:true,
                    
                    key: "mat_min_thick",
                    render: (h, params) => {
                        return h('span',{class:'text-overflow'} ,`> ${params.row.mat_min_thick}`)
                    }
                },
                {
                    title: "母材公称厚度上限（mm）",
                    minWidth: 210,
                    tooltip:true,
                    key: "mat_max_thick",
                    render: (h, params) => {
                        return h('span',{class:'text-overflow'} , `≤ ${params.row.mat_max_thick}`)
                    }
                },
                {
                    title: "允许微小缺陷数量",
                    width: 160,
                    tooltip:true,
                    key: "allow_count",
                    render: (h, params) => {
                        return h('span',{class:'text-overflow'} , `≤ ${params.row.allow_count}`)
                    }
                },
                {
                    title: "降级后等级",
                    minWidth: 140,
                    tooltip:true,
                    render: (h, params) => {
                        if (params.row.demotion_level == 1) {
                            return h('span', {class:'text-overflow'}, 'Ⅰ级')
                        }
                        if (params.row.demotion_level == 2) {
                            return h('span', {class:'text-overflow'}, 'Ⅱ级')
                        }
                        if (params.row.demotion_level == 3) {
                            return h('span', {class:'text-overflow'}, 'Ⅲ级')
                        }
                        if (params.row.demotion_level == 4) {
                            return h('span', {class:'text-overflow'}, 'Ⅳ级')
                        }
                    }

                },
                {
                    title: "备注",
                    minWidth: 80,
                    tooltip:true,
                    key: "remark",
                },

            ],
            tableData: [],
            interfaceList: "setTinyDemotionList",
            interfaceAdd: "setTinyDemotionAdd",
            interfaceDel: "setTinyDemotionDel",
            interfaceEdit: "setTinyDemotionEdit",
        },
        {
            name: "其它降级",
            index: 4,
            columns: [
                {
                    title: "原等级",
                    minWidth: 80,
                    tooltip:true,
                    render: (h, params) => {
                        if (params.row.flaw_level == 1) {
                            return h('span', {class:'text-overflow'}, 'Ⅰ级')
                        }
                        if (params.row.flaw_level == 2) {
                            return h('span', {class:'text-overflow'}, 'Ⅱ级')
                        }
                        if (params.row.flaw_level == 3) {
                            return h('span', {class:'text-overflow'}, 'Ⅲ级')
                        }
                        if (params.row.flaw_level == 4) {
                            return h('span', {class:'text-overflow'}, 'Ⅳ级')
                        }
                    }
                },

                {
                    title: "缺陷属性",
                    minWidth: 110,
                    tooltip:true,
                    key: "flaw_type",
                    render: (h, params) => {
                        if (params.row.flaw_type == 1) {
                            return h('span', {class:'text-overflow'}, '连续缺陷')
                        }
                        if (params.row.flaw_type == 2) {
                            return h('span', {class:'text-overflow'}, '深孔缺陷')
                        }
                    }
                },
                {
                    title: "降级后等级",
                    minWidth: 120,
                    tooltip:true,
                    render: (h, params) => {
                        if (params.row.demotion_level == 1) {
                            return h('span', {class:'text-overflow'}, 'Ⅰ级')
                        }
                        if (params.row.demotion_level == 2) {
                            return h('span', {class:'text-overflow'}, 'Ⅱ级')
                        }
                        if (params.row.demotion_level == 3) {
                            return h('span', {class:'text-overflow'}, 'Ⅲ级')
                        }
                        if (params.row.demotion_level == 4) {
                            return h('span', {class:'text-overflow'}, 'Ⅳ级')
                        }
                    }

                },
                {
                    title: "备注",
                    minWidth: 80,
                    tooltip:true,
                    key: "remark",
                },

            ],
            tableData: [],
            interfaceList: "setpageRuleOtherDemotionList",
            interfaceAdd: "setotherDemotionAdd",
            interfaceDel: "setotherDemotionDel",
            interfaceEdit: "setotherDemotionEdit",
        },
        {
            name: "指定等级（属性）",
            index: 5,
            columns: [
                {
                    title: "致密性",
                    minWidth: 80,
                    tooltip:true,
                    render: (h, params) => {
                        if (params.row.assign_condition == 1) {
                            return h('span', '高')
                        }
                        if (params.row.assign_condition == 2) {
                            return h('span', '低')
                        }
                    }
                },
                {
                    title: "缺陷属性",
                    minWidth: 110,
                    tooltip:true,
                    key: "flaw_type",
                    render: (h, params) => {
                        if (params.row.flaw_type == 1) {
                            return h('span', {class:'text-overflow'}, '连续缺陷')
                        }
                        if (params.row.flaw_type == 2) {
                            return h('span', {class:'text-overflow'}, '深孔缺陷')
                        }
                    }
                },
                {
                    title: "指定等级",
                    minWidth: 110,
                    tooltip:true,
                    render: (h, params) => {
                        if (params.row.assign_level == 1) {
                            return h('span', {class:'text-overflow'}, 'Ⅰ级')
                        }
                        if (params.row.assign_level == 2) {
                            return h('span', {class:'text-overflow'}, 'Ⅱ级')
                        }
                        if (params.row.assign_level == 3) {
                            return h('span', {class:'text-overflow'}, 'Ⅲ级')
                        }
                        if (params.row.assign_level == 4) {
                            return h('span', {class:'text-overflow'}, 'Ⅳ级')
                        }
                    }
                },
                {
                    title: "备注",
                    minWidth: 80,
                    tooltip:true,
                    key: "remark",
                },

            ],
            tableData: [],
            interfaceList: "setAssignLevelList",
            interfaceAdd: "setAssignLevelAdd",
            interfaceDel: "setAssignLevelDel",
            interfaceEdit: "setAssignLevelEdit",
        },
        {
            name: "指定等级（长径）",
            index: 6,
            columns: [
                {
                    title: "缺陷长径（mm）",
                    minWidth: 150,
                    tooltip:true,
                    key: "assign_condition",
                    render: (h, params) => {
                        return h('span',{class:'text-overflow'}, `> ${params.row.assign_condition}`)
                    }
                },

                {
                    title: "缺陷长径类型",
                    minWidth: 130,
                    tooltip:true,
                    render: (h, params) => {
                        if (params.row.flaw_type == 1) {
                            return h('span', {class:'text-overflow'}, '数值')
                        }
                        if (params.row.flaw_type == 2) {
                            return h('span', {class:'text-overflow'}, '母材公称厚度(壁厚)')
                        }
                    }
                },
                {
                    title: "指定等级",
                    minWidth: 110,
                    tooltip:true,
                    render: (h, params) => {
                        if (params.row.assign_level == 1) {
                            return h('span', {class:'text-overflow'}, 'Ⅰ级')
                        }
                        if (params.row.assign_level == 2) {
                            return h('span', {class:'text-overflow'}, 'Ⅱ级')
                        }
                        if (params.row.assign_level == 3) {
                            return h('span', {class:'text-overflow'}, 'Ⅲ级')
                        }
                        if (params.row.assign_level == 4) {
                            return h('span', {class:'text-overflow'}, 'Ⅳ级')
                        }
                    }

                },
                {
                    title: "备注",
                    minWidth: 80,
                    tooltip:true,
                    key: "remark",
                },
            ],
            tableData: [],
            interfaceList: "setAssignLevelList",
            interfaceAdd: "setAssignLevelAdd",
            interfaceDel: "setAssignLevelDel",
            interfaceEdit: "setAssignLevelEdit",
        }
    ],
    formList: [
        {
            title: "不计点数缺陷尺寸",
            index: 0,
            parent_record: "flawSizeInfo",
            children: [
                // type:   1,input  2,select 3,textarea  4 input+select
                { maxlength: 20, rules_type: 'number', required: true, rules_message: "请输入母材公称厚度下限", label: '母材公称厚度下限（mm）', type: 4, prop: true, value1: '', textVal: 1, record: "mat_min_thick", children: [{ name: ">", value: 1 }, { name: "≥", value: 2 }] },
                { maxlength: 20, rules_type: 'number', required: true, rules_message: "请输入母材公称厚度上限", label: '母材公称厚度上限（mm）', type: 4, prop: true, value1: '', textVal: 2, record: "mat_max_thick", children: [{ name: "<", value: 1 }, { name: "≤", value: 2 }] },
                { maxlength: 20, rules_type: 'number', required: true, rules_message: "请输入允许缺陷长径", label: '允许缺陷长径（mm）', type: 4, prop: true, value1: '', textVal: 2, record: "allow_diameter", children: [{ name: ">", value: 1 }, { name: "≤", value: 2 }, { name: "<", value: 3 }, { name: "≤", value: 4 }] },
                { maxlength: 20, required: true, rules_message: "请选择类型", label: '类型', type: 2, prop: true, value1: '', record: "diameter_type", children: [{ name: "数值", value: 1 }, { name: "母材公称厚度(壁厚)", value: 2 }] },
                { maxlength: 200, required: false, rules_message: "", label: '备注', type: 3, value1: '', record: "remark", },
            ]
        },
        {
            title: "缺陷点数换算表",
            parent_record: "conversionInfo",
            index: 1,
            children: [
                { maxlength: 20, rules_type: 'number', required: true, rules_message: "请输入缺陷长径下限", label: '缺陷长径下限', type: 4, prop: true, value1: null, record: "min_diameter", textVal: 1, children: [{ name: ">", value: 1 }, { name: "≥", value: 2 }] },
                { maxlength: 20, rules_type: 'number', required: true, rules_message: "请输入缺陷长径上限", label: '缺陷长径上限', type: 4, prop: true, value1: null, record: "max_diameter", textVal: 2, children: [{ name: "<", value: 1 }, { name: "≤", value: 2 }] },
                { maxlength: 20, rules_type: 'number', required: true, rules_message: "请输入缺陷点数", label: '缺陷点数', type: 1, prop: true, value1: null, record: "flaw_count" },
                { maxlength: 200, label: '备注', type: 3, value1: '', record: "remark", },
            ]
        },
        {
            title: "允许缺陷点数",
            parent_record: "allowCountInfo",
            index: 2,
            children: [
                { maxlength: 20, required: true, rules_message: "请选择缺陷等级", label: '缺陷等级', type: 2, prop: true, value1: null, record: "flaw_level", children: [{ name: "Ⅰ级", value: 1 }, { name: "Ⅱ级", value: 2 }, { name: "Ⅲ级", value: 3 }, { name: "Ⅳ级", value: 4 }] },
                { maxlength: 20, required: true, rules_message: "请选择评定区域", label: '评定区域', type: 2, prop: true, value1: null, value2: null, record: "area_lenght", record2: "area_width", children: [{ name: "10*10", value: 1 }, { name: "10*20", value: 2 }, { name: "10*30", value: 3 }] },
                { maxlength: 20, rules_type: 'number', required: true, rules_message: "请输入母材公称厚度下限", label: '母材公称厚度下限（mm）', type: 4, prop: true, value1: null, record: "mat_min_thick", textVal: 1, children: [{ name: ">", value: 1 }, { name: "≥", value: 2 }] },
                { maxlength: 20, rules_type: 'number', required: true, rules_message: "请输入母材公称厚度上限", label: '母材公称厚度上限（mm）', type: 4, prop: true, value1: null, record: "mat_max_thick", textVal: 2, children: [{ name: "<", value: 1 }, { name: "≤", value: 2 }] },
                { maxlength: 20, rules_type: 'number', required: true, rules_message: "请输入允许缺陷点数", label: '允许缺陷点数', type: 1, prop: true, value1: null, record: "allow_count", },
                { maxlength: 200, label: '备注', type: 3, value1: '', record: "remark", },
            ]
        },
        {
            title: "微小缺陷降级",
            index: 3,
            parent_record: "tinyDemotionInfo",
            children: [
                { maxlength: 100, required: true, rules_message: "请选择原等级", label: '原等级', type: 2, prop: true, value1: null, record: "flaw_level", children: [{ name: "Ⅰ级", value: 1 }, { name: "Ⅱ级", value: 2 }, { name: "Ⅲ级", value: 3 }, { name: "Ⅳ级", value: 4 }] },
                { label: '母材公称厚度下限（mm）', rules_type: 'number', type: 4, prop: true, value1: null, record: "mat_min_thick", textVal: 1, children: [{ name: ">", value: 1 }, { name: "≥", value: 2 }] },
                { label: '母材公称厚度上限（mm）', rules_type: 'number', type: 4, prop: true, value1: null, record: "mat_max_thick", textVal: 2, children: [{ name: "<", value: 1 }, { name: "≤", value: 2 }] },
                { maxlength: 20, required: true, rules_type: 'number', rules_message: "请输入允许缺陷点数", label: '允许缺陷点数', type: 4, prop: true, value1: null, record: "allow_count", children: [{ name: "<", value: 1 }, { name: "≤", value: 2 }] },
                { maxlength: 20, required: true, rules_message: "请选择降级后等级", label: '降级后等级', type: 2, prop: true, value1: null, record: "demotion_level", children: [{ name: "Ⅰ级", value: 1 }, { name: "Ⅱ级", value: 2 }, { name: "Ⅲ级", value: 3 }, { name: "Ⅳ级", value: 4 }] },
                { maxlength: 200, label: '备注', type: 3, value1: '', record: "remark", },
            ]
        },
        {
            title: "其它降级",
            index: 4,
            parent_record: "otherDemotionInfo",
            children: [
                { maxlength: 100, required: true, rules_message: "请选择原等级", label: '原等级', type: 2, prop: true, value1: null, record: "flaw_level", children: [{ name: "Ⅰ级", value: 1 }, { name: "Ⅱ级", value: 2 }, { name: "Ⅲ级", value: 3 }, { name: "Ⅳ级", value: 4 }] },
                { maxlength: 20, required: true, rules_message: "请选择缺陷属性", label: '缺陷属性', type: 2, prop: true, value1: null, record: "flaw_type", children: [{ name: "连续缺陷", value: 1 }, { name: "深孔缺陷", value: 2 }] },
                { maxlength: 20, required: true, rules_message: "请选择降级后等级", label: '降级后等级', type: 2, prop: true, value1: null, record: "demotion_level", children: [{ name: "Ⅰ级", value: 1 }, { name: "Ⅱ级", value: 2 }, { name: "Ⅲ级", value: 3 }, { name: "Ⅳ级", value: 4 }] },
                { maxlength: 200, label: '备注', type: 3, value1: '', record: "remark", },
            ]
        },
        {
            title: "指定等级（属性）",
            index: 5,
            parent_record: "assignLevelInfo",
            children: [
                { maxlength: 100, required: true, rules_message: "请选择致密性", rules_type: 'string', label: '致密性', type: 2, prop: true, value1: null, record: "assign_condition", children: [{ name: "高", value: '1' }, { name: "低", value: '2' }] },
                { maxlength: 20, required: true, rules_message: "请选择缺陷属性", label: '缺陷属性', type: 2, prop: true, value1: null, record: "flaw_type", children: [{ name: "连续缺陷", value: 1 }, { name: "深孔缺陷", value: 2 }] },
                { maxlength: 20, required: true, rules_message: "请选择指定等级", label: '指定等级', type: 2, prop: true, value1: null, record: "assign_level", children: [{ name: "Ⅰ级", value: 1 }, { name: "Ⅱ级", value: 2 }, { name: "Ⅲ级", value: 3 }, { name: "Ⅳ级", value: 4 }] },
                { maxlength: 200, label: '备注', type: 3, value1: '', record: "remark" },
            ]
        },
        {
            title: "指定等级（长径）",
            index: 6,
            parent_record: "assignLevelInfo",
            children: [
                { maxlength: 100, required: true, rules_type: 'number', rules_message: "请输入缺陷长径", label: '缺陷长径（mm）', type: 4, prop: true, value1: null, record: "assign_condition", textVal: 1, children: [{ name: ">", value: 1 }, { name: "≥", value: 2 }, { name: "<", value: 3 }, { name: "≤", value: 4 }] },
                { maxlength: 20, required: true, rules_message: "请选择缺陷长径类型", label: '缺陷长径类型', type: 2, prop: true, value1: null, record: "flaw_type", children: [{ name: "数值", value: 1 }, { name: "母材公称厚度(壁厚)", value: 2 }] },
                { maxlength: 20, required: true, rules_message: "请选择指定等级", label: '指定等级', type: 2, prop: true, value1: null, record: "assign_level", children: [{ name: "Ⅰ级", value: 1 }, { name: "Ⅱ级", value: 2 }, { name: "Ⅲ级", value: 3 }, { name: "Ⅳ级", value: 4 }] },
                { maxlength: 200, label: '备注', type: 3, value1: '', record: "remark" },
            ]
        }
    ],

}

